package com.ad.admin.util;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by 39466 on 2016/4/20.
 */
public class DBUtil extends SQLiteOpenHelper{
    private static final String DB_NAME = "interview.db";
    private static final int DB_VERSION = 1;

    public DBUtil(Context context){
        super(context,DB_NAME,null,DB_VERSION);
    }



    public DBUtil(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        String sql = "create table question_answer(id integer primary key,question text , answer  text)";
        db.execSQL(sql);

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
